package stocc.subject;

import java.util.ArrayList;
import java.util.List;

public class Method {
	Visibility visibility;
	String name;
	String returnType;
	String code;
	List<String> parameters;
	
	public Method(){
		this.name = null;
		this.visibility = null;
		this.returnType = null;
		this.parameters = new ArrayList<String>();
		this.code = null;
	}
	public Method(Visibility visibility, String returnType, String name){
		this.name = name;
		this.visibility = visibility;
		this.returnType = returnType;
		this.parameters = new ArrayList<String>();
		this.code = null;
	}
	
	public Method(Visibility visibility, String returnType, String name, List<String> parameters, String code){
		this.name = name;
		this.visibility = visibility;
		this.returnType = returnType;
		this.parameters = parameters;
		this.code = code;
	}

	public Visibility getVisibility() {
		return visibility;
	}

	public String getName() {
		return name;
	}

	public String getReturnType() {
		return returnType;
	}

	public String getCode() {
		return code;
	}

	public List<String> getParameters() {
		return parameters;
	}
	public void addParameter(String parameter){
		parameters.add(parameter);
	}
	public void setCode(String code){
		this.code = code;
	}
	public void setVisibility(Visibility vis){
		this.visibility = vis;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setReturnType(String returnType) {
		this.returnType = returnType;
	}
	
	
}
